import numpy as np

def get_matrix():
    matrix = []
    for i in range(3):
        row=[float(x) for x in input().split()]
        matrix.append(row)
    return np.array(matrix)

def get_Ab(matrix,width):
    A=matrix[:,0:width]
    #b=matrix[:][-1]
    # for i in range(height):
    #     row=[]
    #     for j in range(width):
    #         row.append(matrix[i][j])
    #     A.append(row)
    b_lst=[]
    for i in range(len(matrix[0])-width):
        b_lst.append(matrix[:,width+i])

    return A,b_lst


def get_LU(matrix):
    LU=np.zeros((len(matrix),len(matrix[0])))
    for i in range(len(matrix[0])):
        for j in range(i,len(matrix[i])):#行 range(i-1 if i>0 else 0)
            LU[i][j]=matrix[i][j]-sum(LU[i][k]*LU[k][j] for k in range(i))
        for j in range(i+1,len(matrix)):#列
            LU[j][i]=matrix[j][i]-sum(LU[j][k]*LU[k][i] for k in range(i))
            LU[j][i]/=LU[i][i]

    L=np.eye(len(matrix[0]))
    for i in range(1,len(matrix)):
        for j in range(i):
            L[i][j]=LU[i][j]
    U=np.zeros((len(matrix),len(matrix[0])))
    for i in range(0,len(matrix)):
        for j in range(i,len(matrix[0])):
            U[i][j]=LU[i][j]
    return L,U

def solve_y(L,b_lst):
    y_lst=[]
    for b in b_lst:
        y=[]
        for i in range(len(L)):
            y_item=b[i]-sum(L[i][j]*y[j] for j in range(i))
            y.append(y_item)
        y_lst.append(y)
    return y_lst

def solve_x(U,y_lst):
    x_lst=[]
    for y in y_lst:
        #x=np.zeros((1,len(y)))
        x=[0 for i in range(len(y))]
        for i in range(len(U)-1,-1,-1):
            #x_item=y[i]-sum(U[i][j]*x[j] for j in range(len(U)-2,i-1,-1))
            x_item = y[i] - sum(U[i][j] * x[j] for j in range(i+1,len(U)))
            x_item/=U[i][i]
            x[i]=x_item
        x_lst.append(x)
    return x_lst

def show(x_lst):
    # for x in x_lst:
    #     for i in range(len(x)-1):
    #         print("%.3f"%x[i],end=" ")
    #     print("%.3f" % x[len(x)-1])
    for i in range(len(x_lst[0])):
        for j in range(len(x_lst)-1):
            print("%.3f"%x_lst[j][i],end=' ')
        print("%.3f"%x_lst[len(x_lst)-1][i])





A,b=get_Ab(get_matrix(),3)
# print(A)
# print(b)
L,U=get_LU(A)
y_lst=solve_y(L,b)
x_lst=solve_x(U,y_lst)
#print(x_lst)
show(x_lst)


#print(get_LU(A))